From 46d147703337b5ab9e81266869e41c89e6481e08 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Wed, 17 Jun 2020 11:52:43 +0200
Subject: [PATCH] configure.ac: Add support for libplist 2.2

---
 configure.ac | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index c4ffeaf..c3a7a9d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -42,7 +42,9 @@ AC_CHECK_FUNCS([localtime_r])
 AC_CHECK_MEMBERS([struct tm.tm_gmtoff],,,[#include <time.h>])
 dnl sqlite3 is needed for newer ipod models (nano5g), and libplist is needed 
 dnl by libgpod sqlite code
-PKG_CHECK_MODULES(LIBGPOD, glib-2.0 >= 2.16.0 gobject-2.0 sqlite3 libplist >= 1.0 gmodule-2.0)
+LIBPLIST_DEP=libplist
+PKG_CHECK_EXISTS(libplist-2.0, LIBPLIST_DEP=libplist-2.0)
+PKG_CHECK_MODULES(LIBGPOD, glib-2.0 >= 2.16.0 gobject-2.0 sqlite3 $LIBPLIST_DEP >= 1.0 gmodule-2.0)
 
 dnl ***************************************************
 dnl The following functions are only available starting
-- 
2.26.2

